package io.kumao.gateway.controller;

import org.springframework.boot.actuate.health.Status;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

/**
 * 健康检查控制器
 *
 * @author 崔作利
 */
@RestController
@RequestMapping("/health")
public class HealthController {

    @CrossOrigin
    @GetMapping("")
    public Mono<Status> health() {
        return Mono.just(Status.UP);
    }
}
